package general.helperclasses.logger;

public enum LoggingLevel {
	
	ALL(0),
	DEBUG(1),
	WARN(2),
	INFO(3),
	SERVE(4),
	NONE(5);
	
	private int level;
	
	LoggingLevel(int level)
	{
		this.level = level;
	}
	
	public int getLevel()
	{
		return this.level;
	}
	
	@Override
	public String toString() {
		String result;
		
		switch (level) {
			case 0:	result = "ALL";		break;
			case 1:	result = "DEBUG";	break;
			case 2:	result = "WARN";	break;
			case 3:	result = "INFO";	break;
			case 4:	result = "SERVE";	break;
			case 5:	result = "NONE";	break;
			default:result = "UNKNOWN";	break;
		}
		
		return result;
	}
	
	public boolean isHigher(LoggingLevel level)
	{
		return (level.level >= this.level);
			
	}
	
}
